[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
THE MENU RECORD

     The menu record defines all the display parameters for the menu. The
     record is declared as follows:

     MENU_RECORD =
     RECORD
          HEADING1 : STRING;
          HEADING2 : STRING;
          TOPIC : ARRAY[1.. MAX_CHOICES] OF STRING;
          TOTALPICKS : INTEGER;
          PICKSPERLINE : BYTE;
          ADDPREFIX : BYTE;
          TOPLEFTXY : ARRAY[1..2] OF BYTE;
          BOXTYPE : BYTE;
          COLORS : ARRAY[1..5] OF BYTE;
          MARGINS : BYTE;
          ALLOWESC : BOOLEAN;
     END;

     Heading1 - is the heading at the top of the menu. Set this to '' if no
     heading is required.

     Heading2 - is the second heading line at the top of the menu. Set this
     to '' if no heading is required.

     Topic - this is an array of the actual menu prompts that will be
     displayed in the menu, e.g.

          TOPIC[1] := 'VIEW REPORTS ON SCREEN';
          TOPIC[2] := 'SEND REPORTS TO PRINT FILE';
          TOPIC[3] := 'PRINT THE REPORTS';
          TOPIC[4] := 'QUIT';

     Note: the constant Max_Choices (in the file MenuTTT5.pas) dictates the
     maximum number of menu choices. This constant may be increased or
     decreased as necessary.

     TotalPicks - indicates the total number of choices in the menu. In the
     above example, the value would be 4.

     PicksPerLine - declare how many menu picks you want to be displayed on
     each line of the screen, i.e. how many columns of choices. The Toolkit
     automatically adjusts this setting if the text is too long to fit on
     the screen.

     AddPrefix - the Toolkit will, if required, automatically prefix the
     options with Numbers, Letters, or Function keys. If a prefix is not
     required then declare the AddPrefix code as zero, e.g. AddPrefix := 0;

     The other valid settings are 1, 2, 3 and 4.

     1    All the menu options would be prefixed with a single digit
     NUMBER. If TotalPicks exceeds 9, the Toolkit will prefix with an Alpha
     instead.

     2    All the menu options would be prefixed with an Alpha character,
     beginning with A. If TotalPicks exceeds 26, the Toolkit will ignore
     the declaration and set AddPrefix to 0.

     3    All the menu options would be prefixed with a function key,
     beginning with F1. If TotalPicks exceeds 10, the Toolkit will prefix
     with an Alpha instead.

     4    The first capital letter in the Topic is highlighted and the user
     can select a topic by pressing the highlighted letter.

     When a non-zero prefix is operative, the user may press the prefix of
     the desired option. Alternatively, the user can move the cursor to the
     desired option and press Enter.

     TopLeftXY - this two byte array holds the X and Y coordinate for the
     top left corner of the menu, i.e. you need only specify the top left
     corner and the system will calculate all the other dimensions.

     For example, if you want the menu to be displayed in the center of the
     screen starting on the seventh line, the declaration would be:

                    TOPLEFTXY[1] := 0;
                    TOPLEFTXY[2] := 7;

     BoxType - the Boxtype indicates the format of the menu border. The
     valid entries are 0..9 as follows:

     0    no box
     1    single line box
     2    double line box
     3    single top/bottom double sides
     4    double top/bottom single sides
     5    fancy (PFS like) menu format - try it
     6    single line box with drop shadow
     7    double line box with drop shadow
     8    single top/bottom double sides with drop shadow
     9    double top/bottom single sides with drop shadow

     Colors - this is a 5 byte array that defines all the display colors:

     1    foreground color of highlighted pick
     2    background color of highlighted pick
     3    normal foreground color
     4    normal background color
     5    foreground color of box

     For example:

     COLORS[1] := WHITE;
     COLORS[2] := RED;
     COLORS[3] := LIGHTRED;
     COLORS[4] := BLACK;
     COLORS[5] := YELLOW

     Margins - this indicates the number of spaces separating the menu
     border and the picks. Typical values range from 1 to 5.

     AllowEsc - this boolean variable indicates if the ESC key is operative
     i.e. whether the user can escape from the menu. If it is set to false,
     the Esc key is ignored, otherwise the Retcode is set to 1.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson